import abc
import typing as tp

from ..jobs.units import Executor
from ..agent import Agent


class BaseExecutor(abc.ABC):
    def __init__(self, executor: Executor):
        self._executor = executor

    async def run(
            self,
            node: Agent,
            log_callback: tp.Callable[[str, tp.Literal["STDERR", "STDOUT"]], tp.Coroutine] = None
    ) -> int:
        pass

    async def interrupt(self):
        pass

